package com.lagou.controller;

import com.lagou.service.AuthCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/code")
public class AuthCodeController {

	@Autowired
	private AuthCodeService authCodeService;

	@RequestMapping("/create/{email}")
	public Boolean create(@PathVariable("email") String email) {
		//持久化并发送验证码
		authCodeService.addAuthCode(email);
		return true;
	}
}
